var express = require("express");
var router = express.Router();

/* GET home page. */
router.get("/", function (req, res, next) {
  res.render("index", {
    title: "Express",
    user: { sex: "男" },
    info: [{ id: 11, name: "李四" }],
  });
});

router.get("/cate", (req, res) => {
  res.send({
    code: 200,
    msg: "success",
    data: [{ id: 11, name: "鲁班" }],
  });
});

module.exports = router;
